<include file="Public:header" />
{:W('Navigation')}
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">发送站内信</div>
		<div class="row-table-body">
			<p class="form-title">发送站内信&nbsp;&nbsp;<a href="javascript:history.go(-1);">返回</a></p>
			<form class="form-horizontal" action="{:U('core/message/send')}" method="post" >
				<input type="hidden" name="message" value="{$message}">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="name">收件人</label>
					<div class="col-sm-3">
						<input id="to_name" class="form-control" type="text" value="{$message_info['name']}">
						<input id="to_user_id" type="hidden" name="to_user_id" value="{$message_info['user_id']}" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="title">标题</label>
					<div class="col-sm-3">
						<input id="title" class="form-control" type="text" name="title" value="<if condition="$message">回复：{$message_info['title']}</if>"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="content">正文</label>
					<div class="col-sm-5">
						<textarea class="form-control" id="content" rows="4" name="content"></textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="sms"></label>
					<div class="col-sm-3">
						<input type="submit" class="btn btn-primary" value="发送" />&nbsp;&nbsp;
						<input type="button" class="btn" value="取消" onclick="javascript:history.back();"/>
					</div>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
<if condition="!$message_info">
	$(function(){
		$('#to_name').click(function(){
			$('#alert').modal({
				show:true,
				remote:'{:u("core/user/getuserindex")}'
			});
		});
	});
</if>
</script>
<include file="Public:alert" />
<include file="Public:footer" />